$(document).ready(function() {
//load student subject
    $("#Person").load("load_person.jsp");
    $("#Pre_Function").load("load_preFunction.jsp");
    $("#Subject").load("load_subject.jsp");
//load selected option's assignment
    $("#Subject").change(function() {
        //Loading Assignment List
        $("#Assignment").load("load_assignment.jsp?subject="+$("#Subject").val());
        //Clear Function Area
        document.getElementById("Function").innerHTML = "";
    });
//load selected option's assignment function
    $("#Assignment").change(function() {
        //Loading Function List
        $("#Function").load("load_function.jsp?subject="+$("#Subject").val()+"&Assignment="+$("#Assignment").val());
    });
} );

function subassignment(){
   addrecwin = window.open('submit_assign.jsp?assign_id='+ $("#Assignment").val(),'subject_create','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
}